package com.aote.entity.entityfinder;

import javax.servlet.http.HttpServletRequest;

import org.w3c.dom.Element;

import com.aote.util.ThreadLocals;
import com.browsesoft.Entity;
import com.browsesoft.htmlcomponent.HTMLBasicComponent;
import com.browsesoft.user.User;

/**
 * 找当前登录用户的父资源
 */
public class ResourceEntityFinder implements EntityFinder {
	public Entity getEntity(HttpServletRequest request, Element element,HTMLBasicComponent component) {
		User user = (User)ThreadLocals.loginUser.get();
		Entity entity = (Entity)user.getParent();
		return entity;
	}
}
